﻿using System;
using System.Collections.Generic;

namespace ReactiveGraph.Core
{
    public interface IReactiveNode
    {
        IObservable<NodeEvent> Events { get; }
        string NodeName { get; }
        ReactiveNodeList ChildNodes { get; }
        IObservable<Unit> Behaviours { get; }

        IEnumerable<IProperty> Properties { get; }
        IProperty GetProperty(string name);
        IEnumerable<IProperty> GetDescendantProperties();
        bool HasProperty(string name);

        void AttachBehaviour(IObservable<Unit> behaviour);
        void DetachBehaviour(IObservable<Unit> behaviour);
        void AttachProperty(IProperty property);
    }
}